The present invention relates to software debugging, and more specifically, to reserved process and thread identifiers (IDs) for tracing.
In software engineering, tracing involves designating trace hooks in the code path and recording information relating to the hooks during execution of the code. Trace hooks are designated prior to code execution and can be changed (e.g., prior trace hooks can be un-designated and new trace hooks can be designated) prior to a subsequent execution. A trace hook is associated with an operation. As such, an executable (i.e., process) that includes a number of operations can have zero, one, or more than one trace hook associated with it. Tracing has similarities to but is distinct from event logging, which is related to diagnosing the performance of software. Once the code with trace hooks has been executed, analyzing the resulting trace log file facilitates debugging of the code. The trace hooks can be designated by the operating system or, more commonly, a programmer who designates the specific operations in the code that are of interest. The trace log identifies the trace hooks that were encountered during execution of the code and includes the process identifier (PID) and thread identifier (TID) associated with the executable of each trace hook. The TID and PID are currently randomly assigned. Thus, when the tracing is executed on two different machines, for example, different thread and process IDs can (likely, will) be assigned to the same executable.